package com.xmg.day03;

import org.openjdk.jol.info.ClassLayout;

import java.util.concurrent.TimeUnit;

public class JOLDemo {

    public static void main(String[] args) throws InterruptedException {
//        TimeUnit.SECONDS.sleep(5);
//        TT t = new TT();
//        System.out.println(ClassLayout.parseInstance(t).toPrintable());
//
//        synchronized(t){
//            System.out.println(ClassLayout.parseInstance(t).toPrintable());
//        }

        int[] ii = {1,2,3};
        System.out.println(ClassLayout.parseInstance(ii).toPrintable());
        // ii.hashCode();
        synchronized (ii) {
            System.out.println(ClassLayout.parseInstance(ii).toPrintable());
        }
    }

    static class TT{
        int m;
    }
}
